# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=libslirp
pkgver=4.7.0
pkgrel=0
pkgdesc="A general purpose TCP-IP emulator"
url="https://gitlab.freedesktop.org/slirp/libslirp"
arch="all"
license="BSD-3-Clause"
makedepends="meson glib-dev"
subpackages="$pkgname-dev"
options="!check" # no test suite
source="https://gitlab.freedesktop.org/slirp/libslirp/-/archive/v$pkgver/libslirp-v$pkgver.tar.gz"
builddir="$srcdir/$pkgname-v$pkgver"

# secfixes:
#   4.6.0-r0:
#     - CVE-2021-3592
#     - CVE-2021-3593
#     - CVE-2021-3594
#     - CVE-2021-3595
#   4.4.0-r0:
#     - CVE-2020-29129
#     - CVE-2020-29130
#   4.3.1-r0:
#     - CVE-2020-10756
#   4.3.0-r0:
#     - CVE-2020-1983

build() {
	abuild-meson build
	meson compile -C build
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C build
}

sha512sums="
387f4a6dad240ce633df2640bb49c6cb0041c8b3afc8d0ef38186d385f00dd9e4ef4443e93e1b71dbf05e22892b6f2771a87a202e815d8ec899ab5c147a1f09f  libslirp-v4.7.0.tar.gz
"
